package miaofusdk

/**
招行支付的订单数据
*/
type IrichpayRefundOrder struct {
	Id               int    `json:"id,omitempty,string"`
	OutTradeNo       string `json:"out_trade_no,omitempty"`
	UpTradeNo        string `json:"up_trade_no,omitempty"`
	RefundTradeNo    string `json:"refund_trade_no,omitempty"`
	TotalAmount      int    `json:"total_amount"`
	RefundAmount     int    `json:"refund_amount"`
	RealRefundAmount int    `json:"real_refund_amount"`
	RefundTime       string `json:"refund_time,omitempty"`
	MchId            string `json:"mch_id,omitempty"`
	StoreCode        string `json:"store_code,omitempty"`
	ShopCode         string `json:"shop_code,omitempty"`
	OrgCode          string `json:"org_code,omitempty"`
	TradeType        string `json:"trade_type,omitempty"`
	StoreName        string `json:"store_name,omitempty"`
	TradeChannel     string `json:"trade_channel,omitempty"`
	TradeStatus      string `json:"trade_status,omitempty"`
	RefundResult     string `json:"refund_result,omitempty"`
	RefundReason     string `json:"refund_reason,omitempty"`
	RefundOperId     string `json:"refund_oper_id,omitempty"`
	TerminalCode     string `json:"terminal_code,omitempty"`
}

type IrichpayOrder struct {
	Id           int    `json:"id,omitempty,string"`
	OutTradeNo   string `json:"out_trade_no,omitempty"`
	UpTradeNo    string `json:"up_trade_no,omitempty"`
	DownTradeNo  string `json:"down_trade_no,omitempty"`
	TotalAmount  int    `json:"total_amount"`
	CreateTime   string `json:"create_time,omitempty"`
	TradeStatus  string `json:"trade_status,omitempty"`
	MchId        string `json:"mch_id,omitempty"`
	StoreCode    string `json:"store_code,omitempty"`
	ShopCode     string `json:"shop_code,omitempty"`
	OrgCode      string `json:"org_code,omitempty"`
	BarCode      string `json:"bar_code,omitempty"`
	Subject      string `json:"subject,omitempty"`
	Attach       string `json:"attach,omitempty"`
	TerminalCode string `json:"terminal_code,omitempty"`
	OperId       string `json:"oper_id,omitempty"`
	TradeType    string `json:"trade_type,omitempty"`
	StoreName    string `json:"store_name,omitempty"`
	TradeChannel string `json:"trade_channel,omitempty"`
}

type RespIrichpayOrderDetail struct {
	//订单数据
	Order IrichpayOrder `json:"order,omitempty"`
	//这笔订单下包含的所有退款成功和撤单成功的记录
	RefundOrder []IrichpayRefundOrder `json:"refund_order,omitempty"`
}

type RespIrichpayOrder struct {
	Response
	Data RespIrichpayOrderDetail `json:"data,omitempty"`
}

/**
订单详情..
交易成功的直接返回.
非成功的.主动确认一次
*/
